#ifndef SLOTS_UTILITY_H
#define SLOTS_UTILITY_H

#include <string>
#include <stack>

#include "config.h"

BEGIN_SLOTS_NS

template<class X, class A>
inline void Assert(
	A assertion, const std::string & fname, const std::string & info)
{
	if (!assertion) throw X(fname + " | " + info);
}

template<class Adaptor>
class _std_adaptor_helper : public Adaptor
{
public:
	typedef typename Adaptor::container_type container_type;

	_std_adaptor_helper()
	{
		static_assert(
			sizeof(_std_adaptor_helper) == sizeof(stdAdaptor),
			"_std_adaptor_helper type error");
	}

	const container_type & getc()const 
	{	
		return this->c;	
	}

	container_type & getc() 
	{ 
		return this->c; 
	}

}; // class _std_adaptor_helper

END_SLOTS_NS

#define SLOTS_ASSERT(A, X) if (!(A)) slots::Assert<X>(A, __FUNCTION__, #A)

#endif
